|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.eclipse.vtp.desktop.projects.core.ColumnType
public class ColumnType
This class encapsulates the possible data types assigned to database table columns. Only the standard SQL-92 types are supported.
| Field Summary | |
|---|---|
static ColumnType |
BIGDECIMAL
Definition of a typical 8 byte BIGDECIMAL column. |
static ColumnType |
BIGNUMBER
Definition of a typical 8 byte BIGNUMBER column. |
static ColumnType |
BOOLEAN
Definition of a typical BOOLEAN column. |
static ColumnType |
DATETIME
Definition of a typical DATETIME column. |
static ColumnType |
DECIMAL
Definition of a typical 4 byte DECIMAL column. |
static ColumnType |
NUMBER
Definition of a typical 4 byte NUMBER column. |
static ColumnType |
TEXT
Definition of a typical TEXT column. |
static ColumnType |
VARCHAR
Definition of a typical VARCHAR column with 45 characters. |
| Constructor Summary | |
|---|---|
protected |
ColumnType(java.lang.String typeName,
int length)
Creates a new ColumnType with the given type name and
data storage length. |
| Method Summary | |
|---|---|
boolean |
canAutoIncrement()
Determines if the data type of the column can also be configured to auto increment. |
static ColumnType |
custom(java.lang.String typeName,
int length,
boolean nullable,
boolean autoIncrement)
Constructs a new ColumnType from the given type name, data
length, nullable flag, and auto increment flag. |
int |
getLength()
|
java.lang.String |
getTypeName()
|
boolean |
isAutoIncrement()
|
boolean |
isNullable()
Determines if the column can accept or contain NULL values. |
static ColumnType |
load(org.w3c.dom.Element element)
Constructs a new ColumnType from the information stored in the
given XML DOM sturcture. |
void |
write(org.w3c.dom.Element parent)
Generates the XML DOM elements and attributes required to save the information for this column type. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final ColumnType VARCHAR
public static final ColumnType NUMBER
public static final ColumnType BIGNUMBER
public static final ColumnType DECIMAL
public static final ColumnType BIGDECIMAL
public static final ColumnType BOOLEAN
public static final ColumnType DATETIME
public static final ColumnType TEXT
| Constructor Detail |
|---|
protected ColumnType(java.lang.String typeName,
int length)
ColumnType with the given type name and
data storage length.
typeName - The name of the column data typelength - The number of bytes used to store the column values| Method Detail |
|---|
public boolean canAutoIncrement()
true if the column is a NUMBER | BIGNUMBER, false
otherwise.public int getLength()
public boolean isNullable()
true if the column will accept or contain NULL values,
false otherwise.public boolean isAutoIncrement()
true if the column is configured to auto increment, false
otherwise.public java.lang.String getTypeName()
public void write(org.w3c.dom.Element parent)
parent - The parent XML DOM element that will contain the column type information
public static ColumnType custom(java.lang.String typeName,
int length,
boolean nullable,
boolean autoIncrement)
ColumnType from the given type name, data
length, nullable flag, and auto increment flag. This is the primary
method of instanciating this class.
typeName - The data type name for the column typelength - The number of bytes used to store this column types valuesnullable - A flag indicating whether this column type will accept or contain NULL valuesautoIncrement - A flag indicating whether this column type will automatically
increment when new records are added to its database table
ColumnType instance representing the given column type informationpublic static ColumnType load(org.w3c.dom.Element element)
ColumnType from the information stored in the
given XML DOM sturcture. The information must be stored the same format
produced by the write() function of this class.
element - The element that contains the formated data
ColumnType instance represented by the given
column type information
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||